package com.company.poker.client;


public class StringMessageHandler implements IMessageHandler {

    private IClientContext clientContext;

    public StringMessageHandler() {
    }

    public StringMessageHandler(IClientContext clientContext) {
        this.clientContext = clientContext;
    }

    public void handle(IClientContext ctx, String msg) {
//        if (msg.equals("H")) {
        System.out.println("Output: "+"WORLD");
            ctx.write("HELLO WORLD" +'\n');
//        }
    }

    public int handle(IClientContext ctx, byte[] msg) {
        return 0;
    }

    public IClientContext getClientContext() {
        return clientContext;
    }

    public void setClientContext(IClientContext clientContext) {
        this.clientContext = clientContext;
    }
}
